package com.timeset.user.service;

import com.timeset.activity.entity.Orgnaization;
import com.timeset.activity.entity.Student;
import com.timeset.user.entity.User;
import com.timeset.user.mapper.UserMapper;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @ClassName UserServiceImpl
 * @Description
 * @Author SkySong
 * @Date 2020-04-21 17:06
 */
@Service
public class UserServiceImpl {
    @Resource
    private UserMapper userMapper;

    public int addOrganization(Orgnaization orgnaization){
        return userMapper.addOrganization(orgnaization);
    }
    public int addStudent(Student student){
        return userMapper.addStudent(student);
    }
    public Orgnaization findOrganizationById(int id){return userMapper.findOrganizationById(id);}
    public Student findStudentById(int id){return  userMapper.findStudentById(id);}

    //修改组织名字
    public int updateOrgNameById(int id,String name){
        return userMapper.updateOrgNameById(id,name);
    }
    //修改组织简介
    public int updateOrgInformationById(int id,String recommend){
        return userMapper.updateOrgInformationById(id, recommend);
    }
    //修改组织认证资料
    public int updateOrgIdentityContentById(int id,String identityContent){
        return userMapper.updateOrgIdentityContentById(id, identityContent);
    }
    //修改组织联系方式
    public int updateOrgConnectById(int id,String connect){
        return userMapper.updateOrgConnectById(id, connect);
    }
    //修改组织认证状态
    public int updateOrgIdentityById(int id,int status){
        return userMapper.updateOrgIdentityById(id, status);
    }


    //修改学生姓名
    public int updateStuNameById(int id,String name){
        return userMapper.updateStuNameById(id,name);
    }

    //修改学生昵称
    public int updateStuNickNameById(int id,String nickname){
        return userMapper.updateStuNickNameById(id, nickname);
    }


    //修改学生学号
    public int updateStuNumberById(int id,String number){
        return userMapper.updateStuNumberById(id, number);
    }
    //修改学生学院
    public int updateStuCollegeById(int id,String college){
        return userMapper.updateStuCollegeById(id, college);
    }

    //修改学生个人介绍
    public int updateStuRecommend(int id,String commend){
        return userMapper.updateStuRecommend(id, commend);
    }


    //修改学生认证状态
    public int updateStuIdentityById(int id,int status){
        return userMapper.updateStuIdentityById(id, status);
    }
}
